<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateTableSendorders extends Migration {
	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up() {
		Schema::create('sendorders', function (Blueprint $table) {
			$table->increments('id');
			$table->integer('log_id')->comment('sendLog_id');
			$table->integer('map_id')->comment('渠道与活动关联id');
			$table->integer('user_id')->comment('用户id');
			$table->string('order_id', 120)->comment('订单id');
			$table->string('contacts', 50)->nullable()->comment('联系人');
			$table->string('phone', 11)->nullable()->comment('联系电话');
			$table->text('products')->nullable()->comment('商品信息');
			$table->string('receipt_area', 50)->nullable()->comment('所在地区');
			$table->string('receipt_address', 180)->nullable()->comment('收货地址');
			$table->boolean('status')->default(false)->comment('是否发货');
			$table->boolean('read')->default(false)->comment('是否弹窗');
			$table->string('ship_num', 55)->nullable()->comment('运单号码');
			$table->string('ship_company', 55)->nullable()->comment('物流公司');
			$table->string('decimal', 10, 2)->nullable()->comment('邮费');
			$table->timestamps();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down() {
		Schema::dropIfExists('sendorders');
	}
}
